package server.business.login.handler;

import server.ScriptEnum;
import server.ServerEngin;
import server.ServerHandler;
import server.business.login.ILoginScript;
import server.commonData.User;

import com.core.initialize.Message;
import com.google.protobuf.GeneratedMessage;
/**
 * 请求切换桌子
 * @author King
 *
 */
public class ChangeTableHandler extends ServerHandler {

	@Override
	public Class<? extends GeneratedMessage> initBodyClass()
	{
		return null;
	}

	@Override
	protected void handler(Message msg, User user) throws Throwable
	{
		if(user==null)
			return;
		//判断是否已经在桌子中了
		ILoginScript scripte = ServerEngin.getInstance().getScriptM().getScript(ScriptEnum.LOGIN_SCRIPT);
		scripte.changeTable(user);
	}
}
